package com.heima.utils.thread;

import com.heima.model.wemedia.pojos.WmUser;

public class WmThreadLocalUtil {
    private final static ThreadLocal<WmUser> WM_USER_THREAD_LOCAL=new ThreadLocal<>();

    /**
     * 存放参数
     * @param wmUser
     */
    public static void setWmUser(WmUser wmUser){
        WM_USER_THREAD_LOCAL.set(wmUser);
    }

    /**
     * 获得参数
     * @return
     */
    public static WmUser getWmUser(){
        return WM_USER_THREAD_LOCAL.get();
    }
    /**
     * 删除参数
     */
    public static void removeWmUser(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
